package com.jy.appmarket.model;

import java.io.Serializable;

import android.graphics.drawable.Drawable;

public class InstalledApkInfo implements Serializable, Comparable<InstalledApkInfo> {
	private static final long serialVersionUID = 2665486356805526553L;
	private String packageName;
	private String apkName;
	private long fileSize;
	private String apkVersionName;
	private Drawable apkIcon;
	private long installTime;

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public String getApkName() {
		return apkName;
	}

	public void setApkName(String apkName) {
		this.apkName = apkName;
	}

	public long getFileSize() {
		return fileSize;
	}

	public void setFileSize(long fileSize) {
		this.fileSize = fileSize;
	}

	public String getApkVersionName() {
		return apkVersionName;
	}

	public void setApkVersionName(String apkVersionName) {
		this.apkVersionName = apkVersionName;
	}

	public Drawable getApkIcon() {
		return apkIcon;
	}

	public void setApkIcon(Drawable apkIcon) {
		this.apkIcon = apkIcon;
	}

	@Override
	public int compareTo(InstalledApkInfo another) {
		if (installTime == another.installTime) {
			return 0;
		} else if (installTime > another.installTime) {
			return -1;
		} else {
			return 1;
		}
	}

	public long getInstallTime() {
		return installTime;
	}

	public void setInstallTime(long installTime) {
		this.installTime = installTime;
	}
}
